<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let arr = [123, 'asd', 'zhangsan', 'lisi']
    // 想要将arr数组转换为字符串
    let str = arr.toString()
    let str2 = arr.join('-')
    // console.log(str2);
    // 使用Array.isArray 验证是否是一个数组
    // console.log(Array.isArray(arr));
    // console.log(Array.isArray(str));
    // 使用Array.from 去将类数组转换为数组
    console.log(Array.from('zhangsan'));
  </script>
</body>

</html>